package Threads;

import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;

public class Collection_demo {
    public static void main(String[] args) {
        Collection c = new HashSet();
        c.add("ss");
        c.add("cc");
        c.add("cc");
//        System.out.println(c);
//        Iterator it = c.iterator();
//        while (it.hasNext()){
//            String s = (String) it.next();
//            System.out.println(s);
//        }

        for(Object o :c){
            String s = (String) o;
            System.out.println(s);
        }
    }
}
